﻿using UnityEngine;

/// <summary>
/// 草元素与激化元素
/// </summary>
public class GeneralGrassAura : IGeneralElementAura
{
    private readonly IElementHolder _holder;
    private readonly IElementAura _grassAura;
    private readonly IElementAura _quickenAura;

    public GeneralGrassAura(IElementHolder holder)
    {
        _holder = holder;
        _grassAura = _holder.GetElementAura("草");
        _quickenAura = _holder.GetElementAura("激化");
    }

    public float Gauge => Mathf.Max(_grassAura.Gauge, _quickenAura.Gauge);

    public void UseGauge(float cost)
    {
        _grassAura.Gauge -= cost;
        _quickenAura.Gauge -= cost;
    }
}